#ifndef PBVP_CYLINDR_SHAPE_H
#define PBVP_CYLINDR_SHAPE_H

#include "../math/Vector3.h"
#include "../renderer/GLSLProgram.h"
#include "shape.h"

#ifdef _WIN32
#include <windows.h>
#endif
#include <glut.h>

namespace PBVP {
	///
	class Cylinder : public Shape {
    public:
		/// Destructor
		virtual ~Cylinder() {}

		/// Rendering function
		virtual void render();

		Vector3 start, end;
		double radius;

		static Cylinder* makeCylinder(const Vector3& s, const Vector3& e, double r);

	private:
		// rotation axis and angle from +z direction
		Vector3 axis;
		double angle;

		static GLSLProgram *pGLSLProg;
        static GLUquadricObj *quadObj;
		static bool initialized;

		static void initGLSLProgram();

		/// Make the constructor private
		Cylinder() {}
	};
}
#endif